package com.ziyia.roomtest;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity
public class Book  {
    @PrimaryKey(autoGenerate = true)
    public Long id;
    private String name;
    private Integer page;
    private String author;


    public Book() {
    }


    public Book(String name, Integer page) {
        this.name = name;
        this.page = page;
    }

    public Book(Long id, String name, Integer page) {
        this.id = id;
        this.name = name;
        this.page = page;
    }

    public Book(String name, Integer page, String author) {
        this.name = name;
        this.page = page;
        this.author = author;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", page=" + page +
                ", author='" + author + '\'' +
                '}';
    }
}
